import network from '@/network'

// 添加新闻
function addnewsApi(option){
	return network({
		url: '/news',
		method: 'post',
		data: option.data
	})
}

// 查询所有新闻列表
function newsListApi(option){
	return network({
		url: '/news/',
		method: 'get',
		params: option.params
	})
}

// 删除新闻
function deletenewsApi(id){
	return network({
		url: `/news/${id}/`,
		method: 'delete'
	})
}

export {
	addnewsApi,
	newsListApi,
	deletenewsApi
}